<!DOCTYPE html>
<html lang="zh-cn" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title th:text="${config.sitename}"></title>
    <meta name="keywords" th:content="${config.keywords}">
    <meta name="description" th:content="${config.description}">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=0.9">
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <link rel="stylesheet" type="text/css" href="/static/css/index.css">
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">
    <script type="text/javascript" charset="utf-8" src="/static/js/jquery-1.11.3.min.js"></script>
    <script src="/static/js/bootstrap.min.js"></script>
</head>
<body background="/static/images/bg1.jpg">
<div class="container" style="padding-top:20px;">
    <div class="col-xs-12 col-sm-10 col-lg-8 center-block" style="float: none;">
        <div class="panel panel-primary">
            <div class="panel-heading" style="background: linear-gradient(to right,#8ae68a,#5ccdde,#b221ff);">
                <center>
                    <font color="#000000">
                        <b th:text="${config.panel}"></b>
                    </font>
                </center>
            </div>
            <div class="panel-body">
                <center>
                    <div class="alert alert-success">
                        <a th:href="'http://wpa.qq.com/msgrd?v=3&uin='+${config.kfqq}+'&site=qq&menu=yes'">
                            <img class="img-circle m-b-xs"
                                 style="border: 2px solid #1281FF; margin-left:3px; margin-right:3px;"
                                 th:src="'https://q4.qlogo.cn/headimg_dl?dst_uin='+${config.kfqq}+'&spec=100'"
                                 width="60px" height="60px" th:alt="${config.sitename}"><br>
                        </a>
                        <th:block th:text="${config.gg}"></th:block>
                    </div>
                    <form id="submitsss" action="/quickpass/pay" method="post">
                        <input type="hidden" name="title" th:value="${config.panel}">
                        <input type="hidden" name="payType" value="1" id="fewfew">
                        <input type="hidden" name="uid" th:value="${config.uid}">
                        <div class="input-group">
                            <span class="input-group-addon">
                                <span class="glyphicon glyphicon-barcode"></span> 单号:
                            </span>
                            <input type="text" size="30" name="outOrderId" value=""
                                   class="form-control" id="dehwjnkdhbefiebdw" readonly/>
                        </div>
                        <br/>
                        <div class="input-group">
                        <span class="input-group-addon">
                            <span class="glyphicon glyphicon-shopping-cart"></span> 商品:
                        </span>
                            <input type="text" size="30" name="context" th:value="${config.liuyan}" class="form-control"
                                   required="required"/>
                        </div>
                        <br/>
                        <div class="input-group">
                            <span class="input-group-addon">
                                <span class="glyphicon glyphicon-yen"></span> 金额
                            </span>
                            <input type="text" size="30" name="price" value="0.01" class="form-control"
                                   required="required"/>
                        </div>
                        <br/>
                        <center>
                            <div class="alert alert-warning">选择一种方式进行支付</div>
                        </center>
                        <center>
                            <div class="btn-group btn-group-justified" role="group" aria-label="...">
                                <th:block th:if="${user.payAlipay != -1}">
                                    <div class="btn-group" role="group">
                                        <button type="radio" name="payType1" class="btn btn-primary"
                                                onclick="submit_ajax(2)">支付宝
                                        </button>
                                    </div>
                                </th:block>
                                <th:block th:if="${user.payQqpay != -1}">
                                    <div class="btn-group" role="group">
                                        <button type="radio" name="payType1" class="btn btn-danger"
                                                onclick="submit_ajax(3)">QQ
                                        </button>
                                    </div>
                                </th:block>
                                <th:block th:if="${user.payWxpay != -1}">
                                    <div class="btn-group" role="group">
                                        <button type="radio" name="payType1" class="btn btn-info"
                                                onclick="submit_ajax(1)">
                                            微信
                                        </button>
                                    </div>
                                </th:block>
                            </div>
                        </center>
                    </form>
                </center>
            </div>
        </div>
    </div>
    <div class="col-xs-12 col-sm-10 col-lg-8 center-block" style="float: none;">
        <div class="panel panel-primary">
            <div class="panel-heading" style="background: linear-gradient(to right,#b221ff,#14b7ff,#8ae68a);">
                <center><font color="#000000"><b>历史记录</b></font></center>
            </div>
            <div class="table-responsive" id="table_load">
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>订单号</th>
                        <th>支付方式</th>
                        <th>支付金额</th>
                        <th>状态</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="obj,state:${model.list}">
                        <td th:text="${obj.outOrderId}"></td>
                        <td th:switch="${o?.payType}">
                            <th:block th:case="1">微信</th:block>
                            <th:block th:case="2">支付宝</th:block>
                            <th:block th:case="3">QQ</th:block>
                        </td>
                        <td th:text="${obj.price}+'元'"></b></td>
                        <td th:switch="${obj.status}">
                            <th:block th:case="1">未支付</th:block>
                            <th:block th:case="2">已支付</th:block>
                            <th:block th:case="3">已退款</th:block>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <p style="text-align:center">&copy; Powered by <a th:href="${config.ym}" th:text="${config.copy}"></a>!</p>
    <audio autoplay="autoplay" height="100" width="100">
        <source th:src="${config.music}" type="audio/mp3"/>
    </audio>
</div>
</body>
<script>

    function submit_ajax(id, obj) {
        $("#fewfew").val(id);
        $("#submitsss").submit();
    }

    $(function () {
        $.post("/quickpass/orderid",
            {"times": new Date().getTime()},
            function (data) {
                $("#dehwjnkdhbefiebdw").val(data.oid);
            }, "json");
    });

</script>
</html>